package com.power.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.power.model.Result;
import com.power.domain.SysLog;
import com.power.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sys/log")
public class SysLogController {
    @Autowired
    private SysLogService service;
    @GetMapping("/page")
    public Result getListPage(@RequestParam("current") int current,
                              @RequestParam("size") int size ,
                              @RequestParam(value ="userId",required = false) Integer userId,
                              @RequestParam(value ="operation",required = false) String operation)
    {
        Page<SysLog> page=new Page<>(current,size);
       Page pageList= service.getlistpage(page,userId,operation,current);

    return Result.success(pageList);
    }
}
